<?php

namespace app\admin\controller\shopro;

use app\admin\model\shopro\Bonus;
use app\admin\model\shopro\BonusLog as BonusLogModel;

class WalletLog extends Common
{

    public function _initialize()
    {
        parent::_initialize();
        $this->model = new BonusLogModel();
    }



    /**
     * 列表
     */
    public function index()
    {
        dump(!$this->request->isAjax());die();
        $money=Bonus::find()["money"]??0;
        if (!$this->request->isAjax()) {
            $this->assign("money",$money);
            return $this->view->fetch();
        }
        $log = $this->model->with("user")->paginate($this->request->param('list_rows', 10));
        $data["data"]=$log;
        $data["money"]=$money;
        $this->success('获取成功', null, $data);
    }
}
